str1 = input('>>>输入字符串')
str2 =''
list1 = [] #统计出现的字符
result = [] #结果
for i in str1:
    str_count = 0
    if i not in list1:#判断重复
        list1.append(i)
        str_count = str1.count(i) 
        str2 = "\"" + i + "\"" + ':' + str(str_count)
        result.append(str2)
        
print("字符:次数",result)
